package com.hzdl.car.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzdl.car.bean.Log;
import com.hzdl.car.bean.Role;
import com.hzdl.car.mapper.LogMapper;
import com.hzdl.car.service.LogService;
import com.hzdl.car.vo.LogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private LogMapper lm;
    @Override
    public PageInfo findLogByWhere(LogVo logVo) {
        PageHelper.startPage(logVo.getPage(),logVo.getLimit());
        List<Log> lList = lm.findLogByWhere(logVo);
        PageInfo pageInfo = new PageInfo(lList);
        return pageInfo;
    }

    @Override
    public int insertLogInfo(LogVo logVo) {
        return lm.insertLogInfo(logVo);
    }

    @Override
    public int deleteAllLog(Integer logId) {
        return lm.deleteAllLog(logId);
    }

}
